test DoctrineOrmPropertyMetadataFactory#773
Conversation
e6e7e5e to
ad81182
Compare
| foreach ($identifiers as $identifier) { | ||
| if ($identifier === $property) { | ||
| $propertyMetadata = $propertyMetadata->withIdentifier(true); | ||
| if ($doctrineClassMetadata instanceof ClassMetadataInfo) { |
There was a problem hiding this comment.
Why this change ? It looks wrong to me (isIdentifierNatural isn't part of the interface).
There was a problem hiding this comment.
Oh gosh you're right, looked the wrong interface (Persistence vs ORM)
6b2e55f to
2e1b562
Compare
Simperfit
left a comment
There was a problem hiding this comment.
Could you please rebase ?
2e1b562 to
270bad3
Compare
| foreach ($identifiers as $identifier) { | ||
| if ($identifier === $property) { | ||
| $propertyMetadata = $propertyMetadata->withIdentifier(true); | ||
| $writable = false; |
There was a problem hiding this comment.
Why removing the else? It avoids an extra assignation.
There was a problem hiding this comment.
$writable also gets assigned in the else. IMO it helps for readability.
There was a problem hiding this comment.
Yes but here it is assigned 2 times instead of 1 in most cases ($doctrineClassMetadata is almost always an instance of ClassMetadataInfo): first it is assigned to false, then it is instantly assigned to the value of $doctrineClassMetadata->isIdentifierNatural()).
270bad3 to
bb3af99
Compare
|
Thank you @soyuka |
test DoctrineOrmPropertyMetadataFactory
Made this because: